package com.demo.study.creative.d03_builder;

/**
 * builder 复杂对象构建模式，适用于构造复杂对象
 *
 * @author Baymax
 * @since 2021/1/17
 */
public class BuilderMain {
    public static void main(String[] args) {
        Person person = new PersonBuilder()
                .builderBase("张三", 18, Person.Sex.MALE.name())
                .buildAddress()
                .buildHobby("打篮球")
                .build();
        System.out.println(person);
    }
}
